<template>
	<view class="p-page p-hose-page">
		<u-radio-group v-model="ztLocation.certificateType" @change="groupChange">
			<view class="flex al">
				<u-radio name="1"> 不动产权证 </u-radio>
				<u-radio name="1"> 房产证 </u-radio>
			</view>
		</u-radio-group>


		<view class="tip"> 证件只作为验证房源真实性及房源信息匹配，</view>
		<view class="tip">将自动屏蔽不展示于信息展示页。</view>
		<view class="flex-line">
			<uploader pathFlag="1" :file="ztLocation.certificatePath" tag="certificatePath" />
			<uploader pathFlag="1" :file="ztLocation.planPath" tag="planPath" />
		</view>

		<input class="address" 
		placeholder-style="color: #ccc;font-size:12px" 
		v-model="ztLocation.propertyAddress" placeholder="物业单元地址"
		  @change="changeInput"
		 />
		
        <view class="more" v-if="render('menpai-more')">
        	<view class="divider" style="margin: 20px 0;">
        		
        	</view>
        	
        	<view class="flex" style="margin: 10px 0;">
        		<InputArea placeholder="所在楼栋" tail="座" decimal="0" :val="ztLocation.building" target="ztLocation"
        			wename="building" />
        		<InputArea placeholder="所在楼层" tail="层" decimal="0" :val="ztLocation.storey" target="ztLocation"
        			wename="storey" />
        	</view>
        	<view class="flex" style="margin: 10px 0;">
        		<InputArea placeholder="门票号码" tail="号" decimal="0" :val="ztLocation.houseNumber" target="ztLocation"
        			wename="houseNumber" />
        		<InputArea placeholder="楼栋总层" tail="顶" decimal="0" :val="ztLocation.totalStorey" target="ztLocation"
        			wename="totalStorey" />
        	</view>
        	<view class="tip"> 楼栋门牌信息不会显示于展示信息页，</view>
        	<view class="tip">准确输入可自动匹配单元数据库信息。</view>
        	
        	<view class="tip-infos"> </view>
        </view>
	</view>
</template>

<script>
	export default {
		name: "we",
		data() {
			return {
				ztLocation: {}
			};
		},
		methods:{
			groupChange(value){
				console.log(value);
				this.ztLocation.propertyStatus = value;
				this.$store.dispatch("ztLocation", { propertyStatus: value });
			},
			changeInput(e){
				console.log("changeInput",e);
				this.$store.dispatch("ztLocation", { propertyAddress: this.ztLocation.propertyAddress });
			},
		}
	}
</script>

<style lang="scss">
	.p-hose-page {
		.flex-line {
			display: flex;
			justify-content: space-between;
			margin: 10px 10vw 10px 4vw;
		}

		.tip {
			color: #ccc;
			font-size: 12px;
		}

		.address {
			border: 1px solid #ccc;
			border-radius: 10px;
			padding: 4px 10px;
			width: 80%;
			text-align: center;
			margin-top: 10px;
		}

		.al {
			display: flex;
			align-items: baseline;
		}

		.al>view {
			margin-right: 10px;
		}

	}
</style>
